﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Text;

namespace ALMDDD.AspNetCore.HttpUtils
{
    /// <summary>
    /// http 调用
    /// </summary>
    public class MyHttpContext
    {
        public static IServiceProvider ServiceProvider;


        public HttpContext HttpContext
        {
            get
            {
                var handle = ServiceProvider.GetService(typeof(Microsoft.AspNetCore.Http.IHttpContextAccessor));
                HttpContext httpContext = ((Microsoft.AspNetCore.Http.HttpContextAccessor)handle).HttpContext;
                return httpContext;
            }
        }
        
    }
}
